Integrand size = 26, antiderivative size = 543 \[ \int \frac {\left (d+e x^n\right )^2}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\frac {x \left (b^2 d^2-2 a b d e-2 a \left (c d^2-a e^2\right )+\left (b c d^2-4 a c d e+a b e^2\right ) x^n\right )}{a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}-\frac {2 e^2 x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{b^2-4 a c-b \sqrt {b^2-4 a c}}-\frac {\left (\left (b c d^2-4 a c d e+a b e^2\right ) (1-n)-\frac {b^2 \left (a e^2 (1-3 n)-c d^2 (1-n)\right )+4 a c \left (c d^2-a e^2\right ) (1-2 n)+4 a b c d e n}{\sqrt {b^2-4 a c}}\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b-\sqrt {b^2-4 a c}\right ) n}-\frac {2 e^2 x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{b^2-4 a c+b \sqrt {b^2-4 a c}}-\frac {\left (\left (b c d^2-4 a c d e+a b e^2\right ) (1-n)+\frac {b^2 \left (a e^2 (1-3 n)-c d^2 (1-n)\right )+4 a c \left (c d^2-a e^2\right ) (1-2 n)+4 a b c d e n}{\sqrt {b^2-4 a c}}\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b+\sqrt {b^2-4 a c}\right ) n} \]
x*(b^2*d^2-2*a*b*d*e-2*a*(-a*e^2+c*d^2)+(a*b*e^2-4*a*c*d*e+b*c*d^2)*x^n)/a /(-4*a*c+b^2)/n/(a+b*x^n+c*x^(2*n))-x*hypergeom([1, 1/n],[1+1/n],-2*c*x^n/ (b-(-4*a*c+b^2)^(1/2)))*((a*b*e^2-4*a*c*d*e+b*c*d^2)*(1-n)+(-b^2*(a*e^2*(1 -3*n)-c*d^2*(1-n))-4*a*c*(-a*e^2+c*d^2)*(1-2*n)-4*a*b*c*d*e*n)/(-4*a*c+b^2 )^(1/2))/a/(-4*a*c+b^2)/n/(b-(-4*a*c+b^2)^(1/2))-x*hypergeom([1, 1/n],[1+1 /n],-2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))*((a*b*e^2-4*a*c*d*e+b*c*d^2)*(1-n)+(b ^2*(a*e^2*(1-3*n)-c*d^2*(1-n))+4*a*c*(-a*e^2+c*d^2)*(1-2*n)+4*a*b*c*d*e*n) /(-4*a*c+b^2)^(1/2))/a/(-4*a*c+b^2)/n/(b+(-4*a*c+b^2)^(1/2))-2*e^2*x*hyper geom([1, 1/n],[1+1/n],-2*c*x^n/(b-(-4*a*c+b^2)^(1/2)))/(b^2-4*a*c-b*(-4*a* c+b^2)^(1/2))-2*e^2*x*hypergeom([1, 1/n],[1+1/n],-2*c*x^n/(b+(-4*a*c+b^2)^ (1/2)))/(b^2-4*a*c+b*(-4*a*c+b^2)^(1/2))
Leaf count is larger than twice the leaf count of optimal. \(2980\) vs. \(2(543)=1086\).
Time = 3.84 (sec) , antiderivative size = 2980, normalized size of antiderivative = 5.49 \[ \int \frac {\left (d+e x^n\right )^2}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\text {Result too large to show} \]
-((x*(-(a*Sqrt[b^2 - 4*a*c]*(b^2*d^2 + 2*a^2*e^2 + b*c*d^2*x^n + a*b*e*(-2 *d + e*x^n) - 2*a*c*d*(d + 2*e*x^n))) + (a*b*c*d^2*(a + x^n*(b + c*x^n))*( Hypergeometric2F1[-n^(-1), -n^(-1), (-1 + n)/n, (b - Sqrt[b^2 - 4*a*c])/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n)]/((c*x^n)/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n ))^n^(-1) - Hypergeometric2F1[-n^(-1), -n^(-1), (-1 + n)/n, (b + Sqrt[b^2 - 4*a*c])/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n)]/((c*x^n)/(b + Sqrt[b^2 - 4*a* c] + 2*c*x^n))^n^(-1)))/2^n^(-1) - 2^(2 - n^(-1))*a^2*c*d*e*(a + x^n*(b + c*x^n))*(Hypergeometric2F1[-n^(-1), -n^(-1), (-1 + n)/n, (b - Sqrt[b^2 - 4 *a*c])/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n)]/((c*x^n)/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n))^n^(-1) - Hypergeometric2F1[-n^(-1), -n^(-1), (-1 + n)/n, (b + Sqrt[b^2 - 4*a*c])/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n)]/((c*x^n)/(b + Sqrt[b ^2 - 4*a*c] + 2*c*x^n))^n^(-1)) + (a^2*b*e^2*(a + x^n*(b + c*x^n))*(Hyperg eometric2F1[-n^(-1), -n^(-1), (-1 + n)/n, (b - Sqrt[b^2 - 4*a*c])/(b - Sqr t[b^2 - 4*a*c] + 2*c*x^n)]/((c*x^n)/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n))^n^( -1) - Hypergeometric2F1[-n^(-1), -n^(-1), (-1 + n)/n, (b + Sqrt[b^2 - 4*a* c])/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n)]/((c*x^n)/(b + Sqrt[b^2 - 4*a*c] + 2 *c*x^n))^n^(-1)))/2^n^(-1) - (a*b*c*d^2*n*(a + x^n*(b + c*x^n))*(Hypergeom etric2F1[-n^(-1), -n^(-1), (-1 + n)/n, (b - Sqrt[b^2 - 4*a*c])/(b - Sqrt[b ^2 - 4*a*c] + 2*c*x^n)]/((c*x^n)/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n))^n^(-1) - Hypergeometric2F1[-n^(-1), -n^(-1), (-1 + n)/n, (b + Sqrt[b^2 - 4*a*...
Time = 1.55 (sec) , antiderivative size = 543, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {1766, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (d+e x^n\right )^2}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx\) |
\(\Big \downarrow \) 1766 |
\(\displaystyle \int \left (\frac {-a e^2+x^n \left (2 c d e-b e^2\right )+c d^2}{c \left (a+b x^n+c x^{2 n}\right )^2}+\frac {e^2}{c \left (a+b x^n+c x^{2 n}\right )}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {x \left ((1-n) \left (a b e^2-4 a c d e+b c d^2\right )-\frac {b^2 \left (a e^2 (1-3 n)-c d^2 (1-n)\right )+4 a b c d e n+4 a c (1-2 n) \left (c d^2-a e^2\right )}{\sqrt {b^2-4 a c}}\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a n \left (b^2-4 a c\right ) \left (b-\sqrt {b^2-4 a c}\right )}-\frac {x \left (\frac {b^2 \left (a e^2 (1-3 n)-c d^2 (1-n)\right )+4 a b c d e n+4 a c (1-2 n) \left (c d^2-a e^2\right )}{\sqrt {b^2-4 a c}}+(1-n) \left (a b e^2-4 a c d e+b c d^2\right )\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a n \left (b^2-4 a c\right ) \left (\sqrt {b^2-4 a c}+b\right )}+\frac {x \left (x^n \left (a b e^2-4 a c d e+b c d^2\right )-2 a b d e-2 a \left (c d^2-a e^2\right )+b^2 d^2\right )}{a n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )}-\frac {2 e^2 x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{-b \sqrt {b^2-4 a c}-4 a c+b^2}-\frac {2 e^2 x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{b \sqrt {b^2-4 a c}-4 a c+b^2}\) |
(x*(b^2*d^2 - 2*a*b*d*e - 2*a*(c*d^2 - a*e^2) + (b*c*d^2 - 4*a*c*d*e + a*b *e^2)*x^n))/(a*(b^2 - 4*a*c)*n*(a + b*x^n + c*x^(2*n))) - (2*e^2*x*Hyperge ometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/(b^ 2 - 4*a*c - b*Sqrt[b^2 - 4*a*c]) - (((b*c*d^2 - 4*a*c*d*e + a*b*e^2)*(1 - n) - (b^2*(a*e^2*(1 - 3*n) - c*d^2*(1 - n)) + 4*a*c*(c*d^2 - a*e^2)*(1 - 2 *n) + 4*a*b*c*d*e*n)/Sqrt[b^2 - 4*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/(a*(b^2 - 4*a*c)*(b - Sqrt[b ^2 - 4*a*c])*n) - (2*e^2*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c* x^n)/(b + Sqrt[b^2 - 4*a*c])])/(b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*c]) - (((b* c*d^2 - 4*a*c*d*e + a*b*e^2)*(1 - n) + (b^2*(a*e^2*(1 - 3*n) - c*d^2*(1 - n)) + 4*a*c*(c*d^2 - a*e^2)*(1 - 2*n) + 4*a*b*c*d*e*n)/Sqrt[b^2 - 4*a*c])* x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a* c])])/(a*(b^2 - 4*a*c)*(b + Sqrt[b^2 - 4*a*c])*n)
3.1.76.3.1 Defintions of rubi rules used
Int[((d_) + (e_.)*(x_)^(n_))^(q_)*((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_ ))^(p_), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^n)^q*(a + b*x^n + c*x^(2 *n))^p, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && EqQ[n2, 2*n] && NeQ [b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && ((IntegersQ[p, q] && !IntegerQ[n]) || IGtQ[p, 0] || (IGtQ[q, 0] && !IntegerQ[n]))
\[\int \frac {\left (d +e \,x^{n}\right )^{2}}{\left (a +b \,x^{n}+c \,x^{2 n}\right )^{2}}d x\]
\[ \int \frac {\left (d+e x^n\right )^2}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int { \frac {{\left (e x^{n} + d\right )}^{2}}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}} \,d x } \]
integral((e^2*x^(2*n) + 2*d*e*x^n + d^2)/(c^2*x^(4*n) + b^2*x^(2*n) + 2*a* b*x^n + a^2 + 2*(b*c*x^n + a*c)*x^(2*n)), x)
Timed out. \[ \int \frac {\left (d+e x^n\right )^2}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\text {Timed out} \]
\[ \int \frac {\left (d+e x^n\right )^2}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int { \frac {{\left (e x^{n} + d\right )}^{2}}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}} \,d x } \]
((b*c*d^2 - (4*c*d*e - b*e^2)*a)*x*x^n + (b^2*d^2 + 2*a^2*e^2 - 2*(c*d^2 + b*d*e)*a)*x)/(a^2*b^2*n - 4*a^3*c*n + (a*b^2*c*n - 4*a^2*c^2*n)*x^(2*n) + (a*b^3*n - 4*a^2*b*c*n)*x^n) - integrate(-(b^2*d^2*(n - 1) - 2*a^2*e^2 - 2*(c*d^2*(2*n - 1) - b*d*e)*a + (b*c*d^2*(n - 1) - (4*c*d*e*(n - 1) - b*e^ 2*(n - 1))*a)*x^n)/(a^2*b^2*n - 4*a^3*c*n + (a*b^2*c*n - 4*a^2*c^2*n)*x^(2 *n) + (a*b^3*n - 4*a^2*b*c*n)*x^n), x)
\[ \int \frac {\left (d+e x^n\right )^2}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int { \frac {{\left (e x^{n} + d\right )}^{2}}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}} \,d x } \]
Timed out. \[ \int \frac {\left (d+e x^n\right )^2}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx=\int \frac {{\left (d+e\,x^n\right )}^2}{{\left (a+b\,x^n+c\,x^{2\,n}\right )}^2} \,d x \]